Skip to content

feat: show community sentiment on social twitter post pages - #6373

Merged
rebelchris merged 2 commits into
mainfrom
feat/community-sentiment-twitter-posts
Aug 27, 2026
Merged

feat: show community sentiment on social twitter post pages#6373
rebelchris merged 2 commits into
mainfrom
feat/community-sentiment-twitter-posts

Conversation

@rebelchris

@rebelchris rebelchris commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

What

Completes the X community-takes chain on the frontend: tweet posts now render the CommunitySentiment surface. The backend generates takes for tweets from their X reply threads (dailydotdev/yggdrasil#711 + dailydotdev/bragi#262 + dailydotdev/daily-api#4024), but tweets use the dedicated SocialTwitterPostContent layout, which never showed the take.

Rebased & slimmed down (Aug 27). The original version extracted PostFocusCard's gating into a shared useCommunitySentiment hook with full-page-only semantics. Main has since moved: #6507 added the take to the legacy PostContent layout, and #6520/#6523 changed PostFocusCard to show takes in post modals too (with withPostById cache hydration). This PR now touches only the tweet layout and follows those newer semantics — no refactor, no PostFocusCard changes.

Changes

  • SocialTwitterPostContent: renders <CommunitySentiment> after the tweet body (thread markdown / embedded quote preview), using the same inline gating as PostContent on main: maps the wire shape, conditionally enrolls in the community_sentiment experiment only when a take exists (no enrollment dilution from take-less posts), with the isDevelopment local-preview escape hatch, and the compact mb-4 spacing in modals. Shown on both the full post page and the preview modal, matching the direction set by fix: show community takes in post modals #6520/fix: render community takes in feed-opened post modals #6523.
  • No GraphQL changes: communitySentiment already rides SHARED_POST_INFO_FRAGMENT, and both POST_BY_ID_QUERY and POST_BY_ID_STATIC_FIELDS_QUERY (which the tweet post page uses) spread it. The layout is already wrapped in withPostById, so feed-opened modals hydrate the take from the post-by-id cache like the other surfaces.

Tests / verification

  • New SocialTwitterPostContent.spec.tsx (4 tests), mirroring the PostContent.spec.tsx pattern (raw component, real GrowthBook via TestBootProvider, no mocks): renders on the post page with take + flag; renders in the preview modal; hidden without a take; hidden with the flag off.
  • Full shared suite: 2635 passed (only failures are the 3 pre-existing numberFormat locale assertions that fail on non-en-US machines — untouched here, green in CI). webapp suite: 602 passed (only failure is the pre-existing WorldGuideSheet locale assertion, verified failing on clean main). typecheck-strict-changed and eslint clean.

Rollout

Nothing new to flip: the surface obeys the existing community_sentiment experiment. Tweets simply join the eligible surfaces.

🤖 Generated with Claude Code

Preview domain

https://feat-community-sentiment-twitter.preview.app.daily.dev

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Aug 27, 2026 12:43pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Aug 27, 2026 12:43pm

Request Review

Tweet posts use the dedicated SocialTwitterPostContent layout, which never
rendered the community take. Gate and render it with the same inline
conditional-enrollment pattern PostContent and PostFocusCard use on main,
including the newer show-in-modal semantics from #6520/#6523.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rebelchris
rebelchris merged commit be1a7a6 into main Aug 27, 2026
12 checks passed
@rebelchris
rebelchris deleted the feat/community-sentiment-twitter-posts branch August 27, 2026 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant